﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web;
using System.Web.Mvc;

namespace OnlineJobPortal.Models
{
    public class HomeRepository : IHomeRepository
    {
        public bool VerifyUser(String Email, String Password)
        {
            var objEntities = new JobPortalEntities2();
            var user_data = objEntities.Users.ToList();
            foreach (var v in user_data)
            {
                if (Email.Equals("User") && v.Email.Equals(Email) && v.Password.Equals(Password))
                {
                    return true;
                }
                if ((Email.Equals("Company") && v.Email.Equals(Email) && v.Password.Equals(Password)))
                {
                    return true;
                }
                
             }
              return false;
          }
    }
}